home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 49 / Amiga Format CD49 (2000-01-17)(Future Publishing)(GB)(Track 1 of 3)[!][issue 2000-02].iso / -serious- / graphics / amicad / arexx / souligner.amicad < prev    next >
Text File  |  1999-12-06  |  828b  |  40 lines

  1. /* Soulignement d'un ou plusieurs textes */
  2. /* $VER: Souligner 1.00 (© R.Florac, 17 septembre 1998 */
  3.  
  4. options results
  5.  
  6. signal on error
  7. signal on syntax
  8.  
  9. objets=0
  10. 'SAVEALL(-1):FIRSTSEL'; i=result
  11. do while i>0
  12.     objets = objets + souligner(i)
  13.     'NEXTSEL('i')'; i=result
  14. end
  15. if objets=0 then do
  16.     'PICKOBJ("Sélectionnez le texte à souligner")'
  17.     i=result
  18.     if i>0 then call souligner(i)
  19. end
  20. exit
  21.  
  22. souligner: procedure
  23.     parse arg i
  24.     'TYPE(O__='i')'; type=result
  25.     if type = 4 | type = 5 | type = 6 then do
  26.     'DRAW(COL(O__),LINE(O__)+1,COL(O__)+WIDTH(O__)+1,LINE(O__)+1)'
  27.     return 1
  28.     end
  29. return 0
  30.  
  31. /* Traitement des erreurs, interruption du programme */
  32. syntax:
  33. erreur=RC
  34. 'MESSAGE("Erreur de syntaxe"+CHR(10)+"en ligne 'SIGL'"+CHR(10)+"'errortext(erreur)'")'
  35. exit
  36.  
  37. error:
  38. 'MESSAGE("Erreur en ligne 'SIGL'")'
  39. exit
  40.